import Vue from 'vue'
import Router from 'vue-router'
// @就是src目录
// import HelloWorld from '@/components/HelloWorld'
import home from '@/pages/home/home'
import member from '@/pages/member/member'
import shopcar from '@/pages/shopcar/shopcar'
import search from '@/pages/search/search'
import news from '@/pages/home/children/news'
import newscontent from '@/pages/home/children/children/newscontent'

Vue.use(Router)

export default new Router({
  routes: [
    {path: '/', redirect: '/home'},
    {
      path: '/home',
      name: 'home',
      component: home
    },
    {
      path: '/member',
      name: 'member',
      component: member
    },
    {
      path: '/shopcar',
      name: 'shopcar',
      component: shopcar
    },
    {
      path: '/search',
      name: 'search',
      component: search
    },
    {
      path: '/home/news',
      name: news,
      component: news
    },
    {
      path: '/home/news/newscontent/:id',
      name: newscontent,
      component: newscontent
    }
  ],
  linkActiveClass: 'mui-active'
})
